/***********************************************************************************/
/* Code license:  GNU General Public License v3                                    */
/* Main page:     https://code.google.com/p/library-cross-platform/                */
/* Issue tracker: https://code.google.com/p/library-cross-platform/issues/list     */
/***********************************************************************************/

#include "parser.h"
#include "types.h"

using namespace std;

parser::parser()
{
  pstream = null;
}

parser::parser(std::istream* p)
{
  setStream(p);
}

parser::~parser()
{
}

void parser::setStream(std::istream *p)
{
  if(pstream != null)
  {
    delete pstream;
    pstream = null;
  }
  pstream = p;
}

std::istream *parser::getStream()
{
  return pstream;
}
